# Maintainer: Xiaotian Wu <yetist@gmail.com>

_target_arch=x86
_target=x86_64-linux-gnu
pkgname=$_target-linux-api-headers
pkgver=5.19.12
pkgrel=1
pkgdesc="Kernel headers sanitized for use in userspace ($_target)"
arch=(any)
url='https://www.kernel.org'
license=(GPL2)
makedepends=('rsync')
source=(https://www.kernel.org/pub/linux/kernel/v5.x/linux-$pkgver.tar.{xz,sign})
sha512sums=('567dfb4302ea6a8961ad3b6dba332a925d262fbc8830a77da75a7be19db3cb19080260787cfcd0318b7893b71c655e2bcb1fc71dd07ff5627064fd33635bb2a4'
            'SKIP')
validpgpkeys=(
  'ABAF11C65A2970B130ABE3C479BE3E4300411886'  # Linus Torvalds
  '647F28654894E3BD457199BE38DBBDC86092693E'  # Greg Kroah-Hartman
)


build() {
  cd linux-$pkgver

  make ARCH=$_target_arch mrproper
}

package() {
  cd linux-$pkgver

  make INSTALL_HDR_PATH="$pkgdir/usr/$_target/" ARCH=$_target_arch V=0 headers_install
}
